﻿namespace Blaze.Editor.Analysing
{
    /// <summary>
    /// Apk的单个文件信息。
    /// </summary>
    public struct EntryInfo
    {
        public string Name;
        public long CompressedSize;
        public long UncompressedSize;
        public string Category;

        /// <summary>
        /// 获取压缩比。
        /// </summary>
        public float CompressRate
        {
            get
            {
                if (UncompressedSize == 0)
                    return 0;
                return 1 - (float) CompressedSize/UncompressedSize;
            }
        }
    }
}